/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2019 HUST Dian Group
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Original Author: Pengyu Liu <eicliupengyu@gmail.com>
 */
#pragma once
#include "ns3/nstime.h"
#include "robo-common.h"
namespace ns3 {
struct RoboWeapon
{
  int m_heat;
  int m_ammoNumber;
  Time m_nextShootTime;
  RoboWeapon ()
  {
    m_heat = 0;
    m_ammoNumber = 0;
  }
};

enum AmmoType { AmmoType17, AmmoType42 };

int GetHeatOf (AmmoType ammoType, float speed);
float GetOverspeedLife (AmmoType ammoType, float speed, float maxSpeed, int maxLife);

extern const int gWeaponCoolingValue[MAX_ROBO_TYPE][MAX_WEAPON_ID][MAX_LEVEL];

extern const int gWeaponMaxHeat[MAX_ROBO_TYPE][MAX_WEAPON_ID][MAX_LEVEL];

extern const int gWeaponMaxAmmoNum[MAX_ROBO_TYPE][MAX_WEAPON_ID];
extern const int gWeaponInitAmmoNum[MAX_ROBO_TYPE][MAX_WEAPON_ID];

extern const float gWeaponRedius[MAX_WEAPON_ID];
extern const float gWeaponRange[MAX_WEAPON_ID];
extern const float gWeaponMaxSpeed[MAX_WEAPON_ID][MAX_PERFORMANCE_LEVEL];
extern const int gWeaponInjury[MAX_WEAPON_ID];
extern const Time gWeaponShootDelta[MAX_WEAPON_ID];

} // namespace ns3
